﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace K9Nano.AspNetCore.Security;

public sealed class JwtOptions
{
    public string SecretKey { get; set; } = "63e18cd32f89488489f97091592a2758";

    public string Issuer { get; set; } = "K9API";

    public string Audience { get; set; } = "K9";

    public int ExpiresIn { get; set; } = 24 * 60 * 60; // 秒，1天

    public void Clone(JwtOptions jwtOptions)
    {
        this.SecretKey = jwtOptions.SecretKey;
        this.Issuer = jwtOptions.Issuer;
        this.Audience = jwtOptions.Audience;
        this.ExpiresIn = jwtOptions.ExpiresIn;
    }
}
